//
//  AccountChangeCell.m
//  EasyToTesco2.0
//
//  Created by 杨森 on 2017/4/26.
//  Copyright © 2017年 EasyToTesco. All rights reserved.
//

#import "AccountChangeCell.h"

@implementation AccountChangeCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setControlView];
    }
    return self;
}

- (void)setControlView
{
    _userLbl = [[UILabel alloc] init];
    [self.contentView addSubview:_userLbl];
    _userLbl.font = FONT(13);
    _userLbl.textColor = [UIColor blackColor];
    _userLbl.textAlignment = NSTextAlignmentLeft;
    
    _descLbl = [[UILabel alloc] init];
    [self.contentView addSubview:_descLbl];
    _descLbl.font = FONT(13);
    _descLbl.textColor = [UIColor grayColor];
    _descLbl.textAlignment = NSTextAlignmentLeft;
    
    _numLbl = [[UILabel alloc] init];
    [self.contentView addSubview:_numLbl];
    _numLbl.font = FONT(14);
    _numLbl.textColor = [UIColor blackColor];
    _numLbl.textAlignment = NSTextAlignmentRight;
    
    _timeLbl = [[UILabel alloc] init];
    [self.contentView addSubview:_timeLbl];
    _timeLbl.font = FONT(11);
    _timeLbl.textColor = [UIColor grayColor];
    _timeLbl.textAlignment = NSTextAlignmentRight;
    
    [_userLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.contentView.mas_left).offset(15);
        make.centerY.equalTo(self.contentView.mas_centerY).offset(-10);
    }];
    
    [_descLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.contentView.mas_left).offset(15);
        make.top.equalTo(_userLbl.mas_bottom).offset(5);
    }];
    
    [_numLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.equalTo(self.contentView.mas_right).offset(-15);
        make.centerY.equalTo(self.contentView.mas_centerY).offset(-10);
    }];
    
    [_timeLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.right.equalTo(self.contentView.mas_right).offset(-15);
        make.top.equalTo(_numLbl.mas_bottom).offset(5);
    }];
}


@end
